package chances.epg.data.taglib;

import javax.servlet.jsp.JspException;

import chances.epg.navigator.context.AccessContext;
import chances.epg.navigator.context.AccessContextUtils;

public class AjaxUrlTag extends QueryTag {
	/**
	 * serialVersionUID.
	 */
	private static final long serialVersionUID = 1714545301279970686L;
    private String ajaxName;

	@Override
	public int doEndTag() throws JspException {
		AccessContext context = AccessContextUtils.getAccessContext(this.pageContext);
		String url = this.navigateUrlFactory.generateAjaxURL(context, ajaxName);
		this.setResult(url);
		return SKIP_BODY;
	}

	public String getAjaxName() {
		return ajaxName;
	}

	public void setAjaxName(String ajaxName) {
		this.ajaxName = ajaxName;
	}
}
	


